﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CausaDesvioList.aspx.cs"
    Inherits="WebAppPlanProduccion.App.CausaDesvioList" %>

<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">   
    <link href="/Styles/Temporada.css" rel="stylesheet" type="text/css" />    
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
    <asp:Image Width="15px" Height="15px" ID="imgExpandResults" CssClass="imgExpand"
            ImageUrl="/Images/icon_blockexpanded.png" runat="server" ClientIDMode="Static"
            alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'searchBox');" />
        Buscar Causas de Desv&iacute;os
    </h2>
    <div class="editionContainerFilter" id="searchBox">
        <p>
            <span class="title">Nombre:</span>
            <asp:TextBox ID="txtNombre" runat="server" ClientIDMode="Static" CssClass="inputs inputlong" CampoFiltro="True"></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <asp:LinkButton ID="lnkBuscar" runat="server" OnClick="lnkBuscar_Click">Buscar</asp:LinkButton>
        <a href="#" onclick="return window.AppCommonObj.clearFilters('pnlResults');">Limpiar</a>
        <div class="clear">
        </div>
    </div>
    
    <h2>
        Listado de Causas de Desv&iacute;os
    </h2>
    <asp:Panel ID="pnlResults" CssClass="editionContainerForGrid" runat="server" ClientIDMode="Static">
        <asp:GridView ID="GridCausaDesvios" runat="server" CellPadding="4" ForeColor="#333333"
            GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id" Width="100%" AllowPaging="True"
            OnPageIndexChanging="GridCausaDesvios_PageIndexChanging" OnRowCommand="GridCausaDesvios_RowCommand"
            OnRowDataBound="GridCausaDesvios_RowDataBound">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:ButtonField ButtonType="Image" CommandName="editar" ImageUrl="~/Images/editar.png"
                    Text="Button" AccessibleHeaderText="editar">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>
                <asp:TemplateField HeaderText="">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:ImageButton ID="btnEliminar" runat="server" ImageUrl="~/Images/eliminar.png"
                            CommandName="eliminar" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Id" HeaderText="Id" Visible="false">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Nombre" HeaderText="Nombre">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
            <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </asp:Panel>    
    <asp:LinkButton ID="btnAgregarNuevo" CssClass="agregarNuevo" runat="server" OnClick="btnAgregarNuevo_Click">Agregar</asp:LinkButton>

    <script type='text/javascript'>

        $(document).ready(function () {

            if (!window.AppCommonObj) {
                window.AppCommonObj = new AppCommon();
            }
        });
    </script>
</asp:Content>
